package com.huaxin.hxmoduleworkorder.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huaxin.hxmoduleworkorder.common.enums.CustomerType;
import com.huaxin.hxmoduleworkorder.dto.ResponseResult;
import com.huaxin.hxmoduleworkorder.dto.request.InspectionOrderItemCreateReqDTO;
import com.huaxin.hxmoduleworkorder.dto.request.InspectionOrderItemExistReqDTO;
import com.huaxin.hxmoduleworkorder.dto.request.InspectionOrderItemUpdateReqDTO;
import com.huaxin.hxmoduleworkorder.models.InspectionOrderItem;

import java.util.List;

/**
 * 巡查项服务接口
 * <p>
 * 提供对巡查项的增删改查及业务操作，支持按工单ID批量查询、判断是否存在等。
 * </p>
 *
 * @author fuai
 * @since 2025-09-02
 */
public interface InspectionOrderItemService extends IService<InspectionOrderItem> {
    ResponseResult<String> batchCreate(List<InspectionOrderItemCreateReqDTO> in);

    ResponseResult<String> batchUpdate(List<InspectionOrderItemUpdateReqDTO> in);

    ResponseResult<InspectionOrderItem> getByItemId(String id);

    ResponseResult<List<InspectionOrderItem>> listByOrder(String orderId, String customerId, String cabinetId);

    ResponseResult<Boolean> hasOrderItem(InspectionOrderItemExistReqDTO in);

    ResponseResult<String> deleteByOrderId(String orderId);

    ResponseResult<String> deleteByCustomerId(String orderId, CustomerType customerType, String customerId);

    ResponseResult<String> deleteByRoomId(String orderId, String roomId);

    ResponseResult<String> deleteByCabinetId(String orderId, String roomId, String cabinetId);

    //今日巡查异常项数
    ResponseResult<Long> countTodayExceptionByCustomerId(String orgId);
}